<?php
/*
	[BuyPg] (C) 2010-2011 Buypg
	$Id: ServiceAction.class.php 2011-6-15 9:36:00 wufujun $
*/
if (!defined('THINK_PATH')) {
	exit('Access Denied');
}

class ServiceAction extends BpAction{
	public function aboutus(){
		//定义左侧分类
		$LeftCate = getLeftCategory();
		//模板输出
		$this->assign('leftcate' , $LeftCate);
		$this->display();
	}
	
	public function contactus(){
		//定义左侧分类
		$LeftCate = getLeftCategory();
		//模板输出
		$this->assign('leftcate' , $LeftCate);
		$this->display();
	}
	
	public function help(){
		$helpclassid = isset($_GET['helpclassid']) ? intval($_GET['helpclassid']) : 3;
		$DbHelpClass = M("HelpClass");
		$arrHelpClass = $DbHelpClass->order("class_order DESC , class_id ASC")->select();
		
		$thisClass = $DbHelpClass->where("class_id = $helpclassid")->find();
		
		$DbHelp = M("Help");
		$arrHelp = $DbHelp->where("class = $helpclassid")->order("news_id ASC")->select();
		import("@.ORG.Input");
		foreach($arrHelp as $key => $value){
			$arrHelp[$key]['news_content'] = Input::deleteHtmlTags($value['news_content']);
		}
		//模板输出
		$this->assign('thisClass' , $thisClass);
		$this->assign('arrHelpClass' , $arrHelpClass);
		$this->assign('arrHelp' , $arrHelp);
		$this->display();
	}
	
	public function helpshow(){
		$newsid = isset($_GET['newsid']) ? intval($_GET['newsid']) : 0;
		
		$DbHelpClass = M("HelpClass");
		$arrHelpClass = $DbHelpClass->order("class_order DESC , class_id ASC")->select();
		
		$DbHelp = M("Help");
		$arrHelp = $DbHelp->where("news_id = $newsid")->find();
		if(!$arrHelp){
			$this->error('您查看的信息不存在或已经删除');
		}
		
		//模板输出
		$this->assign('arrHelpClass' , $arrHelpClass);
		$this->assign('arrHelp' , $arrHelp);
		$this->display();
	}
	
	public function dianzihetong(){
		//定义左侧分类
		$LeftCate = getLeftCategory();
		//定义右侧专题列表
		$RightZT = getRightZT();
		
		//模板输出
		$this->assign('leftcate' , $LeftCate);
		$this->assign('rightzt' , $RightZT);
		$this->display();
	}
}
?>
